/**
 * PLM项目辅助函数配置入口
 * 统一导出所有辅助函数模块
 */

// 声明默认空对象
const defaultHelper = {};

// 导入辅助函数 - 使用静态路径和try-catch代替动态require
let cacheHelper = defaultHelper;
try {
  cacheHelper = require('../helpers/cache_helper');
} catch (e) {
  console.warn('导入模块失败: ../helpers/cache_helper，使用空实现', e);
}

let timeHelper = defaultHelper;
try {
  timeHelper = require('../helpers/time_helper');
} catch (e) {
  console.warn('导入模块失败: ../helpers/time_helper，使用空实现', e);
}

let pageHelper = defaultHelper;
try {
  pageHelper = require('../helpers/page_helper');
} catch (e) {
  console.warn('导入模块失败: ../helpers/page_helper，使用空实现', e);
}

let cloudHelper = defaultHelper;
try {
  cloudHelper = require('../helpers/cloud_helper');
} catch (e) {
  console.warn('导入模块失败: ../helpers/cloud_helper，使用空实现', e);
}

let dataHelper = defaultHelper;
try {
  dataHelper = require('../helpers/data_helper');
} catch (e) {
  console.warn('导入模块失败: ../helpers/data_helper，使用空实现', e);
}

let routerHelper = defaultHelper;
try {
  routerHelper = require('../helpers/router_helper');
} catch (e) {
  console.warn('导入模块失败: ../helpers/router_helper，使用空实现', e);
}

let userBiz = defaultHelper;
try {
  userBiz = require('../helpers/user_biz');
} catch (e) {
  console.warn('导入模块失败: ../helpers/user_biz，使用空实现', e);
}

let helper = defaultHelper;
try {
  helper = require('../helpers/helper');
} catch (e) {
  console.warn('导入模块失败: ../helpers/helper，使用空实现', e);
}

// 导出所有辅助函数
module.exports = {
  cacheHelper,
  timeHelper,
  pageHelper,
  cloudHelper,
  dataHelper,
  routerHelper,
  userBiz,
  helper
};
